import { serviceCreate } from '../utils/request'
import { merge } from 'axios/lib/utils'
const http = serviceCreate({
  // baseURL: '/dv',
  // 表单提交
  emulateJSON: true
})
// @config {headers, emulateJSON, loading, msg, errMsg, disableInterceptor}
const methods = {
    // 获取首页轮播图
    getSwipe (params = { jsonp: 'jsonp', pf: 7, id: 1695 }, config) {
        return http.get('/index/getSlider', merge(config, { params }))
    },
    // 获取首页推荐
    getRecommand (params = { jsonp: 'jsonp', day: 3, rid: 0 }, config) {
        return http.get('/index/getRecommend', merge(config, { params }))
    }
}

export default methods
